home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1985 October / 64er_Magazin_85-10_1985_Markt__Technik_de.d64 / xref loeber (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  5KB  |  195 lines

  1. 10 rem*********************************
  2. 20 rem* programmname : xref           *
  3. 30 rem*     c-64                      *
  4. 40 rem*     floppy 1541 o. aehnliche  *
  5. 50 rem*     drucker (z.b. mps 801)    *
  6. 60 rem* von stefan becker             *
  7. 70 rem*********************************
  8. 80 clr:goto150
  9. 90 x2=x:get#1,a$:x=asc(a$+chr$(0)):if(64andst)=0thenreturn
  10. 100 close1:ifpathenpa=0:goto520
  11. 110 goto960
  12. 120 gosub90:x1=x:gosub90:x=x1+256*x:return
  13. 130 ifsp<obandva<obandps<obthenreturn:rem*** grenzen erreicht ? ***
  14. 140 print:print"[194]itte die [214]ariable ob in [218]eile 150 vergroessern.":goto1310
  15. 150 ob=500:dimsp$(ob),ps$(ob),va$(ob)
  16. 160 rem*** ob ist obergrenze der anzahl der spruenge und variablen ***
  17. 170 poke53280,6:poke53281,6
  18. 180 n$=chr$(0)
  19. 190 le$="                                                  "
  20. 200 printchr$(147)chr$(9)chr$(14)chr$(8)chr$(144);
  21. 210 print"          [195]ross-[210]eferenz-[204]ister         "
  22. 220 print"[193]usgabe auf ":print"[194][146]ildschirm oder [196][146]rucker[145][145][145]"
  23. 230 printspc(12);:poke204,0
  24. 240 geta$:ifa$<>"b"anda$<>"d"goto240
  25. 250 ifa$="b"thenprint"[194]ildschirm.":dv=3:goto270
  26. 260 print"[196]rucker.":dv=4
  27. 270 print"                       [145]"
  28. 280 open1,0:print"[208]rogrammname: ";:input#1,na$:close1:print
  29. 290 open2,8,15:open1,8,2,na$+",p,r":gosub1290:gosub120:ifx=2049then310
  30. 300 print:print"[196]as [208]rogramm muss ab 2049 liegen.":goto1310
  31. 302 :
  32. 304 :
  33. 305 rem********************************
  34. 306 rem     pass 1 sprungtabelle
  35. 308 rem********************************
  36. 309 :
  37. 310 print"[147][208]ass 1 ([211]uchen der [211]pruenge)":pa=1
  38. 320 gosub120:gosub120:ze$=right$("     "+str$(x),5):print""ze$
  39. 325 y=0:y2=0
  40. 330 gosub90
  41. 340 ifx=0goto320
  42. 342 ifx=34theny2=noty2
  43. 345 ify2then330
  44. 348 ifx=137orx=138orx=141orx=167orx=203thens1$="":y1=0:y2=0:goto355
  45. 350 goto330
  46. 355 ifx=203theny=1
  47. 358 ifx=167theny1=1
  48. 360 gosub90:ifx=32orx=164andythen360
  49. 370 ifx>=48andx<=57thens1$=s1$+a$:goto360
  50. 380 ifs1$=""goto470
  51. 390 s1$=right$("      "+s1$,6)
  52. 400 ifleft$(sp$(sp),5)<>ze$thensp=sp+1:gosub130:sp$(sp)=ze$+":"
  53. 410 iflen(sp$(sp))>70thensp=sp+1:gosub130:sp$(sp)=ze$+":"
  54. 420 ifright$(sp$(sp),6)<>s1$thensp$(sp)=sp$(sp)+s1$
  55. 430 fori=1tops
  56. 440 ifleft$(ps$(i),6)<>s1$thennext:ps=i:gosub130:ps$(i)=s1$+":"
  57. 450 iflen(ps$(i))<70then460
  58. 455 ifright$(ps$(i),5)=ze$then470
  59. 458 next:ps=ps+1:i=ps:gosub130:ps$(i)=s1$+":"+ze$:goto470
  60. 460 ifright$(ps$(i),5)<>ze$thenps$(i)=ps$(i)+" "+ze$
  61. 470 ifx=0goto320
  62. 480 ifx=44thens1$="":goto360
  63. 490 ifx=58orx>64andx<91then330
  64. 495 ify1thenifx=137orx=138orx=141orx=203then355
  65. 498 ifx>127then330
  66. 500 print:print"[198]ehler im [209]uellprogramm. [218]eile:"ze$:goto1310
  67. 502 :
  68. 504 :
  69. 506 rem -------------------------------
  70. 510 rem*** sortieren der sprungziele (feld ps$( ***
  71. 515 rem -------------------------------
  72. 516 :
  73. 520 fori=1tops-1
  74. 530 forj=i+1tops
  75. 540 ifleft$(ps$(i),5)>left$(ps$(j),5)goto560
  76. 550 ps$(0)=ps$(i):ps$(i)=ps$(j):ps$(j)=ps$(0)
  77. 560 nextj
  78. 570 nexti
  79. 574 :
  80. 575 rem--------------------------------
  81. 576 rem   ausgabe spruenge + sprungziele
  82. 577 rem--------------------------------
  83. 578 :
  84. 580 open1,dv,7:print#1,"[208]rogrammname: "na$:print#1
  85. 590 print#1,"sprungtabelle           "
  86. 600 print#1,"--------------------------"
  87. 605 print#1,"zeile :   sprung auf zeile      ":print#1
  88. 610 fori=1tosp
  89. 620 ifleft$(sp$(i-1),5)=left$(sp$(i),5)thenprint#1,spc(7)mid$(sp$(i),7):goto640
  90. 630 print#1," "sp$(i)
  91. 640 nexti:print#1
  92. 645 print#1,"zeile :   wird angesprungen von":print#1
  93. 650 ps$(0)="":fori=psto1step-1
  94. 660 ifleft$(ps$(i+1),6)<>left$(ps$(i),6)thenprint#1,ps$(i):goto680
  95. 670 print#1,spc(6);mid$(ps$(i),7)
  96. 680 nexti:close1
  97. 690 print"[206][146]ochmals/[215][146]eiter"
  98. 700 geta$:ifa$<>"n"anda$<>"w"goto700
  99. 710 ifa$="n"goto580
  100. 712 :
  101. 714 :
  102. 715 rem********************************
  103. 716 rem     pass 2 variable suchen
  104. 718 rem********************************
  105. 719 :
  106. 720 print"[147][208]ass 2 ([211]uchen der [214]ariablen)"
  107. 730 open1,8,2,na$+",p,r":gosub1290:gosub120
  108. 740 gosub120:gosub120:ze$=right$("     "+str$(x),5):print""ze$:y=0
  109. 745 y2=0:y3=0
  110. 750 y1=0:ify3=0thengosub90
  111. 760 y3=0:ifx=0then740
  112. 762 ifx=34theny2=noty2
  113. 764 ify2then750
  114. 770 ifx=131orx=143then800
  115. 780 ifx>64andx<91goto850
  116. 790 goto750
  117. 800 ifx=131theny=1
  118. 810 gosub90:ifx=0goto740
  119. 820 ifx=34theny2=noty2
  120. 825 ify2then810
  121. 830 ifx=58andy=1goto750
  122. 840 goto810
  123. 850 v1$=a$
  124. 855 ifx=69thenifx2>47andx2<58orx2=46then750
  125. 860 gosub90
  126. 865 ifx=34theny3=1:goto890
  127. 870 ifx=36orx=37thenv1$=v1$+a$:gosub90:y3=1:goto880
  128. 875 ifx>47andx<58orx>64andx<91then952
  129. 880 ifx=40thenv1$=v1$+a$
  130. 890 v1$=left$(v1$+"    ",4)
  131. 900 fori=1tova
  132. 910 ifleft$(va$(i),4)<>v1$thennext:va=i:gosub130:va$(i)=v1$+"  :"
  133. 920 iflen(va$(i))<50then930
  134. 925 ifright$(va$(i),5)=ze$then940
  135. 928 next:va=va+1:i=va:gosub130:va$(i)=v1$+" :"+ze$:goto940
  136. 930 ifright$(va$(i),5)<>ze$thenva$(i)=va$(i)+" "+ze$
  137. 940 ifx=0goto740
  138. 950 goto750
  139. 952 ify1=0thenv1$=v1$+a$:y1=1
  140. 954 goto860
  141. 956 rem -------------------------------
  142. 960 rem *** sortieren der variablen (feld va$( ***
  143. 965 rem -------------------------------
  144. 968 :
  145. 970 fori=1tova
  146. 980 forj=itova
  147. 990 ifleft$(va$(i),4)>left$(va$(j),4)goto1010
  148. 1000 va$(0)=va$(i):va$(i)=va$(j):va$(j)=va$(0)
  149. 1010 nextj
  150. 1020 nexti:va=va-1:i=va
  151. 1025 :
  152. 1030 print"[147][215]ollen [211]ie zu den [214]ariablen":print"[194]emerkungen eingeben?  ";
  153. 1040 geta$:ifa$="n"goto1180
  154. 1050 ifa$<>"j"goto1040
  155. 1060 print"[202]a"
  156. 1070 print"[214]ariablenname: ";left$(va$(i),4)
  157. 1073 printle$
  158. 1075 iflen(va$(i))>70thenprint"[145][145]"right$(va$(i),25)
  159. 1080 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)goto1080
  160. 1090 ifa$="[145]"theni=i+1:ifi>vatheni=va
  161. 1100 ifa$=""theni=i-1:ifi<1theni=1
  162. 1110 ifa$<>chr$(13)goto1070
  163. 1120 vr$=left$(va$(i),4):open1,0
  164. 1130 print"[212]ext:";:input#1,te$:print:close1:te$=left$(te$,25)
  165. 1140 fori=vato1step-1
  166. 1150 ifleft$(va$(i),4)<>vr$thennext:print"[206]icht vorhanden.":goto1070
  167. 1160 va$(i)=left$(va$(i)+le$,55)+right$(le$+te$,25):goto1030
  168. 1170 vr$=left$(vr$,4)
  169. 1175 rem-------------------------------
  170. 1176 rem     ausgabe variable
  171. 1177 rem-------------------------------
  172. 1180 print:open1,dv,7
  173. 1190 print#1,"liste der variablen     :"
  174. 1200 print#1,"-------------------------"
  175. 1210 fori=vato1step-1
  176. 1220 ifleft$(va$(i+1),4)<>left$(va$(i),4)thenprint#1,va$(i):goto1240
  177. 1230 print#1,spc(6);mid$(va$(i),7)
  178. 1240 nexti
  179. 1250 print"n[146]ochmals/w[146]eiter"
  180. 1260 geta$:ifa$<>"n"anda$<>"w"goto1260
  181. 1263 ifa$="n"goto1190
  182. 1266 print"[214]ariablenliste ohne [218]eilennummer (j/n)"
  183. 1267 getr$:ifr$=""then1267
  184. 1268 ifr$<>"j"thenprint:print"ende":goto1310
  185. 1269 print#1:print#1:print#1,"[214]ariablenliste ohne [218]eilennummer"
  186. 1270 print#1,"-------------------------------"
  187. 1271 fori=vato1step-1
  188. 1272 iflen(va$(i))>70thenprint#1,left$(va$(i),8);right$(va$(i),25):goto1274
  189. 1273 print#1,left$(va$(i),8)
  190. 1274 nexti
  191. 1280 goto1310
  192. 1290 input#2,a$,b$:ifa$="00"thenreturn
  193. 1300 print:print"[196]isk-[197]rror: ";b$
  194. 1310 close1:close2:end
  195.